//
//  LTSearchManager.h
//  LTChat
//
//  Created by 俊松何 on 2017/9/21.
//  Copyright © 2017年 俊松何. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "LTUser.h"
#import "LTGroup.h"
#import "LTConversation.h"

typedef enum : NSUInteger {
    LTSearchResultTypeUser = 1,
    LTSearchResultTypeGroup = 2,
    LTSearchResultTypeConversation = 3,
} LTSearchResultType;




@interface LTSearchResultModel : NSObject

@property(nonatomic,assign) LTSearchResultType type;

@property(nonatomic,strong) LTUser *user;

@property(nonatomic,strong) LTGroup *group;

@property(nonatomic,strong) LTConversation *conversation;


@end


@interface LTSearchResult : NSObject

@property(nonatomic,strong) NSString *title;

@property(nonatomic,strong) NSArray *resultArray;

@end

@interface LTSearchManager : NSObject


-(void)searchWithkeyWorld:(NSString *)keyworld
               completion:(void(^)(NSArray<LTSearchResultModel *> *userlist,LTError *lterror))CompletionBlock;

@end
